<%-- 
    Document   : newEditRuta
    Created on : 27/05/2014, 03:21:45 PM
    Author     : USUARIO
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>AdminLTE | Dashboard</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../../css/AdminLTE.css" rel="stylesheet" type="text/css" />
        <!-- DATA TABLES -->
        <link href="../../css/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />

    </head>
    <body class="skin-blue">       
        
        <!-- header logo: style can be found in header.less -->
        <%@include file="../../jspf/header.jspf" %>
        <!-- header logo: style can be found in header.less -->
        
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">                
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- Sidebar user panel -->
                    <div class="user-panel">
                        <div class="pull-left image">
                            <img src="../../img/avatar3.png" class="img-circle" alt="User Image" />
                        </div>
                        <div class="pull-left info">
                            <p>Hello, Jane</p>

                            <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                        </div>
                    </div>
                    <!-- search form -->
                    <form action="#" method="get" class="sidebar-form">
                        <div class="input-group">
                            <input type="text" name="q" class="form-control" placeholder="Search..."/>
                            <span class="input-group-btn">
                                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                    <!-- /.search form -->
                    
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <%@include file="../../jspf/menu.jspf" %>
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Rutas
                        <small>Mantenedor</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
                        <li class="active">Itinerario</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    
                    <% String msg = request.getParameter("msg");
                        if(msg!=null)
                        {
                    %>
                    <div class="col-xs-7">
                        <div class="alert alert-success alert-dismissable">
                            <i class="fa fa-check"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times</button>
                            <b>Confirmación!&nbsp;</b> <%=msg%>.
                        </div>
                    </div>
                    <%
                        }
                        String msgA = request.getParameter("msgA");
                        if(msgA!=null)
                        {
                    %>
                    <div class="col-xs-7">
                        <div class="alert alert-warning alert-dismissable">
                            <i class="fa fa-warning"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            <b>Alerta!</b> <%=msgA%>.
                        </div>
                    </div>
                    <%
                        }
                    %>                    
                    
                    <div class="row">
                        <!-- left column -->                        
                        <div class="col-md-12">
                            <!-- general form elements -->
                            <div class="box box-primary">
                                <div class="box-header">
                                    <h3 class="box-title">Registro Nueva Ruta</h3>
                                </div><!-- /.box-header -->
                                <!-- form start -->
                                <form role="form" action="../../controlador" method="post">
                                    <input type="hidden" value="operRut" name="accion"/>
                                    <input type="hidden" value="I" name="accionBD"/>
                                    <% Integer iduser = (Integer)session.getAttribute("iduser"); %>
                                    <input type="hidden" value="<%=iduser%>" name="userCrea"/>
                                    <div class="box-body">
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <div class="form-group" style="text-align:right;margin:0px;">
                                                    <a href="../itinerario/newEditAgencia.jsp">Nueva Agencia</a>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <div class="form-group">
                                                    <label>Origen</label>
                                                    <select name="rOri" class="form-control">
                                                        <% ModIti_Agencias a =new ModIti_Agencias();
                                                           ArrayList<ModIti_Agencias> lista = a.listarAgencias();
                                                           for(int i=0; i<lista.size(); i++)
                                                           {
                                                        %>
                                                        <option><%=lista.get(i).getCiudad()%></option>
                                                        <%
                                                           }
                                                        %>                                                
                                                    </select>
                                                </div> 
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <div class="form-group">
                                                    <label>Destino</label>
                                                    <select name="rDes" class="form-control">
                                                        <% ModIti_Agencias ag =new ModIti_Agencias();
                                                           ArrayList<ModIti_Agencias> list = ag.listarAgencias();
                                                           for(int i=0; i<list.size(); i++)
                                                           {
                                                        %>
                                                        <option><%=list.get(i).getCiudad()%></option>
                                                        <%
                                                           }
                                                        %>
                                                    </select>
                                                </div> 
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-5">
                                                <div class="form-group">
                                                    <label>Tiempo estimado del recorrido</label>
                                                    <input id="time" name="rTieEstRec" type="text" class="form-control" placeholder="HH:mm" size="5" />                                            
                                                </div> 
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label>Estado</label>
                                            <div class="checkbox">
                                                <label>
                                                    <input name="rEst" type="checkbox"/>
                                                    Deshabilitado
                                                </label>                                                
                                            </div>                                                
                                        </div>
                                    </div><!-- /.box-body -->
                                    <div class="box-footer">
                                        <button type="submit" class="btn btn-primary">Registrar</button>
                                        <a href="listRuta.jsp">
                                            <button type="button" class="btn btn-primary">Cancelar</button>
                                        </a>
                                    </div>
                                </form>
                            </div><!-- /.box -->
                        </div>
                    </div>                    
                </section><!-- /.content -->    
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
        <script src="../../js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="../../js/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="../../js/app.js" type="text/javascript"></script>
        <!-- DATA TABES SCRIPT -->
        <script src="../../js/datatables/jquery.dataTables.js" type="text/javascript"></script>
        <script src="../../js/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
        <!-- page script -->
        <script type="text/javascript">
            $(function() {
                $("#example1").dataTable();
                $('#example2').dataTable({
                    "bPaginate": true,
                    "bLengthChange": false,
                    "bFilter": false,
                    "bSort": true,
                    "bInfo": true,
                    "bAutoWidth": false
                });
            });
        </script>
    </body>
</html>

